Portable optical imaging devices such as bar code readers, optical character readers, digital cameras and the like have come into widespread use in large numbers of retail, industrial and medical applications. Such imaging devices are used to perform routine data entry functions such as pricing, inventory control, etc., with an accuracy and reliability that far exceeds that of manual data entry. These and other advantages, such as high data throughput rates and direct compatibility with data processing devices and systems, assures that imaging devices will become more prevalent in the future. As the use of such devices increases the demands on the devices will increase as well. These demands will dictate that the portable imaging devices of the future read, record and decode ever-increasing quantities and densities of optically encoded data.
Portable imaging devices, such as bar code readers are known for reading one-dimensional (1D) and two-dimensional (2D) bar code symbols, such as bar coded information in supermarkets, etc. A variety of different bar code symbols are widely known and are currently being used in various applications. In those applications where the amount of data is relatively small, the data is conveniently encoded in a one-dimensional bar code symbol. For example, 1D bar code symbologies, such as Code 49, Code 39, Code 128, and Codebar have been developed to allow encoding of relatively small amounts of data. See for example, U.S. Pat. No. 4,794,239, entitled “Multitrack Bar Code and Associated Decode Method”, issued on Dec. 27, 1988, in the name of inventor Allais, in which Code 49 symbology is described. The 1D symbologies use stacked symbols that partition the encoded data into multiple rows, each including a respective 1D bar code pattern. In operation, all or most of the symbols must be scanned, decoded and then linked together to form a complete message.
In accommodating the need for reading, recording and decoding increasing quantities and densities of data, 2D matrix symbologies have been developed which offer orientation-free scanning and greater data densities and capacities that the ID counterparts. 2D matrix codes encode dark or light data elements within a regular polygonal matrix, accompanied by graphical finder, orientation and reference structures. For example, 2D symbologies, such as PDF 417, MaxiCode and DataMatrix have been developed to allow for encoding of large volumes of data. See for example, U.S. Pat. No. 5,304,786, entitled “High Density Two Dimensional Bar Code Symbol”, issued on Apr. 19, 1994, issued in the name of inventors Pavlidis, et al, in which PDF 417 symbology is described. PDF 417 uses a “two-dimensional” scheme in which rows of characters are stacked vertically. That is, there are several rows of bar and space patterns, instead of only one row.
2D solid state image sensors, such as charge couple device (CCD) image sensors, are capable of receiving optically encoded data images and converting them to electrical signals. When these image sensors are incorporated with optical imaging systems that provide properly exposed and focused images of their target and with signal processors that include suitable decoding software, these image sensors are able to read data from various types, shapes and sizes of barcodes and other symbols.
As stated, the ability to read data from a wide range of products diverse in material, size, shape and the like is directly related to providing proper imager exposure to the object being pattern recognized or scanned. Paramount to this concern is the ability to adjust the exposure setting in a real time fashion so that exposure settings are accurate for the image being captured.
In the instance in which the imaging device requires software or an algorithm to decode the image, such as a bar code reader or the like, it is imperative that the imaging device provide properly exposed images to the algorithms. The decode algorithms in such devices are typically limited by the built-in exposure control of the imager (i.e. camera). This limitation will generally slow down the decoding process and add inefficiency to the overall image capture and decode process. Therefore, it becomes imperative to implement an automated exposure control mechanism distinct from the imager, so that the efficiency of the decoding process is not adversely effected.
In most current portable imaging devices that incorporate multiple processors the implementation of automated imager control modules is relatively simplistic because an individual processor can be dedicated to executing the automated exposure control routine while other processors are dedicated to executing operating systems, application programs and the like. However, implementing an exposure control mechanism that will provide accurate real-time exposure settings (i.e. automatic exposure control) under a multi-task operating system environment can be problematic. In a typical multi-tasking environment, a single central processing unit (CPU) may be incorporated that is capable of implementing the application programs, as well as, the image capture and decoding processes. In such a shared processor environment it is necessary to minimize the allocated use of the CPU for any one application. For example, in the image capture and decode process the exposure must be written to the imager during specific intervals of time in the imager's frame period. This requires a real-time response to keep up with the imager's state and to respond to any frame signals from the imager.
Conversely, in a multi-tasking operating system where there are tasks that share the central processing unit (CPU), the routines that the CPU conducts should not preoccupy the CPU continuously with automatic exposure computations. In this regard, what is desired is a dual purpose module that will allow intensive CPU computations to exist at the task level where it can be preempted by other tasks that require CPU time. Additionally, the module will allow for control of the imager in real-time response to exist in an interrupt service routine where it can meet the timing criteria of the imager.
To address this concern, the inventive concepts herein disclosed implement the code/routines in two distinct modules. The module that controls the camera is implemented in an interrupt service routine. Other implementations could implement this module in a high priority or real-time thread or task. The module that does the computations on the image to determine what exposure and gain settings should be used is implemented in lower priority thread or task. This permits the module that does the intensive CPU computations to exist at the task level while the module that controls the imager and requires real-time response exists in an interrupt service routine where it can meet stringent timing criteria.